<%--
  Created by IntelliJ IDEA.
  User: bi
  Date: 2019/1/8
  Time: 11:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <title>供应商页面</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css" />
    <script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>

    <script type="text/javascript">
        function page_nav(frm,num){
            frm.pageIndex.value=num;
            frm.submit();
        }
        function getValue(){
            var providerName=$("#providerName").val();
            if(providerName=="null"){
                $("#providerName").val("");
            }
        }
    </script>

</head>

<body onload="getValue()">
<form method="post" action="/ProviderServlet?action=fenye">
    <div class="menu">
        供应商名称：<input type="text" name="providerName" id="providerName" class="input-text" value="${mingcheng}"/>&nbsp;&nbsp;&nbsp;&nbsp;
        供应商描述：<input type="text" name="providerDesc" id="providerDesc" class="input-text" value="${miaoshu}"/>&nbsp;&nbsp;&nbsp;&nbsp;

        <input type="submit" value="组合查询" class="button" />

    </div>
    <div class="main">
        <div class="optitle clearfix">
            <em><input type="button" name="button" value="添加数据" class="input-button" onclick="location.href='ProviderServlet?action=show'" /></em>
            <div class="title">供应商管理&gt;&gt;</div>
        </div>
        <div class="content">
            <table class="list">
                <tr>
                    <td>供应商编号<input type="hidden" name="pageIndex"/></td>
                    <td>供应商名称</td>
                    <td>供应商描述</td>
                    <td>供应商联系人</td>
                    <td>供应商电话</td>
                    <td>供应商地址</td>
                    <td>供应商传真</td>

                </tr>
                <c:forEach items="${providers }" var="provider">
                    <tr>
                        <td>${provider.id }</td>
                        <td><a href="/ProviderServlet?action=search&id=${provider.id }">${provider.name }</a></td>
                        <td>${provider.description}</td>
                        <td>${provider.contact }</td>
                        <td>${provider.phone}</td>
                        <td>${provider.address }</td>
                        <td>${provider.fax}</td>
                    </tr>
                </c:forEach>
            </table>
        </div>
    </div>
</form>

<%@include file="rollPage.jsp"%>
</body>
</html>
